/*
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.letter.otools.day;

import android.content.Intent;

import com.letter.otools.day.admob.AdmobSplashActivity;

/**
 * Splash Activity that inflates splash activity xml.
 */
public class SplashActivity extends AdmobSplashActivity {
    @Override
    protected int getLayout() {
        return R.layout.activity_splash;
    }

    @Override
    protected void initView() {
        super.initView();
//        Animation animation = new ScaleAnimation(1.0f, 0.8f, 1.0f, 0.8f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
//        animation.setDuration(3000);
//        animation.setInterpolator(new AccelerateDecelerateInterpolator());
//        findViewById(R.id.splash_activity_image).startAnimation(animation);
    }

    @Override
    protected void goMain() {
        if (!MainActivity.isAlive) {
            startActivity(new Intent(this, MainActivity.class));
            finish();
        }
    }
}
